<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Calendar — <{:C('site_title')}></title>
<include file="Public:cssjs" />
<link rel="stylesheet" href="<{:RES}>/css/in.css">
<link rel="stylesheet" href="<{:STATICS}>/centaurus/css/libs/fullcalendar.css" type="text/css"/>
<link rel="stylesheet" href="<{:STATICS}>/centaurus/css/libs/fullcalendar.print.css" type="text/css" media="print"/>
<link rel="stylesheet" href="<{:STATICS}>/centaurus/css/compiled/calendar.css" type="text/css" media="screen"/>
<script src="<{:STATICS}>/centaurus/js/fullcalendar.min.js"></script> 
<script type="text/javascript" src="<{:STATICS}>/js/jquery.form.min.js"></script>
<script type="text/javascript" src="<{:STATICS}>/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="<{:RES}>/js/event.js"></script>
</head>
<body>
<include file="Public:mobilemenu" />

<div id="siteWrapper">	
	<div class="blackHeader">
	<include file="Public:menu" />
	</div>	
	
	<div class="main">
		<div class="row">
			<div class="col-md-9">
				<div class="eventInfo">
					<h1><{$list['title']}></h1>
					<div class="title">Panelist</div>
					<div class="content"><{$list['content']|htmlspecialchars_decode=###}></div>
					<div class="title">Speaker Bio</div>
					<div class="content"><{$list['speaker']|htmlspecialchars_decode=###}></div>
					<div class="title">Location</div>
					<div class="content">
						<p><b>Address:</b><{$list['address']}>,<{$list['city']}>,<{$list['state']}>,<{$list['zip']}></p>
						<p><b>Data:</b><{$list['date']|date="F,d,Y",###}></p>
						<p><b>Time:</b><{$list['starting']}>~<{$list['ending']}></p>
					</div>
					<div class="map" id="map"></div>
					<script>
					var map;
					function initMap() {
						var map = new google.maps.Map(document.getElementById('map'), {
						    zoom: 15,
							scaleControl: false,
							scrollwheel: false,
							disableDoubleClickZoom: true,
						    center: {lat: -34.397, lng: 150.644}
						  });
						  var geocoder = new google.maps.Geocoder();
						  geocodeAddress(geocoder, map);

						/*var cairo = {lat: <{$list['lat']}>, lng:<{$list['lng']}>};
						map = new google.maps.Map(document.getElementById('map'), {
							scaleControl: true,
							center: cairo,
							zoom: 10
						});
						var marker = new google.maps.Marker({map: map, position: cairo});*/
					}

					function geocodeAddress(geocoder, resultsMap) {
					  var address = '<{$list.address}>';
					  geocoder.geocode({'address': address}, function(results, status) {
					    if (status === google.maps.GeocoderStatus.OK) {
					      resultsMap.setCenter(results[0].geometry.location);
					      var marker = new google.maps.Marker({
					        map: resultsMap,
					        position: results[0].geometry.location
					      });
					    } else {
					      alert('Geocode was not successful for the following reason: ' + status);
					    }
					  });
					}
				    </script>
				    <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyD6569ST34pV9m3ECxVXSakk8tz760nfAk&callback=initMap"></script>

					<div class="title" id="app">Application</div>				
					
					<div class="successInfo">Hope to see you in this special event. </div>

					<form id="ajaxForm" action="<{:U('Calendar/save')}>" method="post" class="eventForm form-validata">
						<div class="row">
							<div class="col-xs-3"><input type="text" name="firstName" id="firstName" class="form-control input-lg" placeholder="First Name" data-rule-required="true"></div>
							<div class="col-xs-3"><input type="text" name="lastName" id="lastName" class="form-control input-lg" placeholder="Last Name" data-rule-required="true"></div>
							<div class="col-xs-6"><input type="email" name="email" id="email" class="form-control input-lg" placeholder="Email" data-rule-required="true" data-rule-email="true"></div>
						</div>
						<div class="row">
							<div class="col-xs-3"><input type="text" name="school" id="school" class="form-control input-lg" placeholder="School"></div>
							<div class="col-xs-3"><input type="text" name="major" id="major" class="form-control input-lg" placeholder="Major"></div>
							<div class="col-xs-3"><input type="text" name="wechat" id="wechat" class="form-control input-lg" placeholder="Wechat ID"></div>
						</div>
						<!--div class="row">
							<div class="col-xs-12">
								<div class="checkbox">
							    	<label>
							        	<input type="checkbox" name="career" value="check"> Participating One-on-One Free Career Consultation
							    	</label>
							    </div>
							</div>
						</div-->
						<div class="row">
							<div class="col-xs-3">
							<?php 
							if ($list['date']>time()) {
								if ($list['onlyMember']==1) {
									if ($loginStatus) {
									?>
									<button type="submit" class="btn btn-block" id="form-btn">SIGN ME UP</button>
									<span id="msg"></span>
									<?php 
									}else{
									?>
									<a href="<{:U('Login/index')}>" class="btn btn-block" id="form-btn">LOGIN</a>
									<?php 
									}
								}else{
								?>
								<button type="submit" class="btn btn-block" id="form-btn">SIGN ME UP</button>
								
								<?php 
								}										
							}else{
							?>
							<a href="javascript:void(0)" class="btn btn-block disabled">Expired</a>
							<?php
							}
							?>
							</div>
							<div class="col-xs-9"><span id="msg"></span></div>
						</div>
						<input type="hidden" name="event" value="<{$list['title']}>">
						<input type="hidden" name="eventID" value="<{$list['id']}>">
						<input type="hidden" name="userid" value="<{$userid}>">
					</form>
					
				</div>
			</div>
			<div class="col-md-3">
				<div class="rightInfo">
					<p style="padding:10px"><a href="#app" class="btn btn-block">Application</a></p>
					<div class="r-title">BASIC INFO</div>
					<div class="r-content">
						<li><lable>Date</lable><p><{$list['date']|date="F,d,Y",###}></p></li>
						<li><lable>Time</lable><{$list['starting']}>~<{$list['ending']}></li>
						<li><lable>Address</lable><{$list['address']}>,<{$list['city']}>,<{$list['state']}>,<{$list['zip']}></li>
					</div>

					<div class="r-title">CONTACT US</div>
					<div class="r-content">
						<li><lable><i class="fa fa-phone-square"></i></lable><p><{:C('site_tel')}></p></li>
						<li><lable><i class="fa fa-envelope"></i></lable><{:C('site_email')}></li>
						<li><lable><i class="fa fa-whatsapp"></i></lable><{:C('site_whatsApp')}></li>
					</div>
					
				</div>
			</div>
		</div>
	</div>
	

	<include file="Public:footer" />	
</div>
</body>
</html>